package com.shareyi.simpleserver.core;

import java.io.IOException;

import com.shareyi.simpleserver.exception.SimpleServerException;
import com.shareyi.simpleserver.handler.HttpHandler;



public class RequestDispatcher {
			
			private String location;
			
			public RequestDispatcher(String location) {
				this.location=location;
			}
			
			

			public String getLocation() {
				return location;
			}



			public void forward(HttpRequest request,HttpResponse response)
					throws SimpleServerException, IOException {
					request.setDispatcherType(HttpConstant.DISPATCH_TYPE_FORWARD);
					HttpHandler.handleProcess(request.getConnection(), request, response);
			}

}
